<?php if(!defined('ARCH_ROOT_PATH')) exit;
/**
 *	Architect Framework
 *
 *	Architect Framework is a light weight object oriented web applications framework written for PHP 5.1.4 and later that provide the tools to develop and deploy a website or application fast and with as little code as possible.
 *
 *	@author Robin Grass, <hello@coffinboy.se>
 *	@link http://architect.kodlabbet.net
 *	@license http://www.opensource.org/licenses/gpl-3.0.html GNU General Public License (v. 3)
 */

/**
 *	Architect_Template
 *
 *	This class is pretty much the simplest way of handling templates, simple template, custom variables. Uses PHP as template language.
 *
 *	@see Architect_TemplateStream
 *	@see Architect_StreamAbstract
 *
 *	@package Renderers
 *	@version 1.0
 *	@author Robin Grass, <hello@coffinboy.se>
 */
class Architect_Template {

	/**
	 *	@var array $variables
	 */
	protected $variables = array();
	
	/**
	 *	__construct
	 */
	public function __construct() {
		$this->setStreamWrapper('tpl', 'Architect_TemplateStream');
		$this->setIncludePath(ARCH_VIEWS_PATH);
	}
	
	/**
	 *	setVariables
	 *
	 *	@param array $variables
	 */
	public function setVariables($variables) {
		$this->variables = $variables;
	}
	
	/**
	 *	__get
	 *
	 *	@param string $name
	 */
	public function __get($name) {
		return $this->variables[$name];
	}

	/**
	 *	__set
	 *
	 *	@param string $name
	 *	@param mixed $obj
	 */
	public function __set($name, $obj) {
		$this->variables[$name] = $obj;
	}

}
?>